<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<!DOCTYPE HTML>
<html>
<html lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>Highchart</title>
		<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
	    <link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">
	    <script src="//code.jquery.com/jquery-1.10.2.js"></script>
	    <script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
	    <link rel="stylesheet" href="/resources/demos/style.css">
	    <script src="../js/jquery.popupWindow.js"></script>
	    <script src="../js/highcharts.js"></script>
		<script src="../js/exporting.js"></script>


	<!-- 하이차트 4 -->
	<script type="text/javascript">
	$(function () {
		
		$.ajax({
	        url : "admin_Chart_Piechart.do",
	        dataType : "json",
	        success : function(data) {
	        	
	        	$.each(data.year_2014,function(index,items){
	        		var x;
	        		x= items.year
	 	        	x = Number(x);
	        		
	    $('#container4').highcharts({
	        chart: {
	            plotBackgroundColor: null,
	            plotBorderWidth: null,
	            plotShadow: false
	        },
	        title: {
	            text: '2010년 ~ 2014년도별 입사지원 현황'
	        },
	        tooltip: {
	            pointFormat: '<b>{point.percentage:.1f}%</b>'
	        },
	        plotOptions: {
	            pie: {
	                allowPointSelect: true,
	                cursor: 'pointer',
	                dataLabels: {
	                enabled: true,
	                format: '<b>{point.name}</b>',
	                style: {
	                color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
	                }
	                }
	            }
	        },
	        series: [{
	            type: 'pie',
	            name: '',
	            data: [
	                ['2010년', 20],
	                ['2011년', 25],
	                ['2012년', 30],
	                ['2013년', 35],
	                ['2014년', x]
	                ]
					}]
				});
			});
		},
	        	
		error : function(request, status, error) {
		console.log("code:" + request.status + "\n"
             + "message:" + request.responseText
             + "\n" + "error:" + error);
					}
				});
			});
	
	</script>

	</head>
	<body>
		<p><div id="container4" style="width: 440px; height: 380px; max-width: 600px; margin: 0"></div></p>
	</body>
</html>